package com.paad.todolist;

import java.util.*;

public class Army {
	ArrayList<Squad> squads;
	int squadPoints;
	int pointsUsed;
	String armyName;
	int id;
	
	public Army(){
		squadPoints = 8;
		squads = new ArrayList<Squad>();
		/*for(int i = 0; i < squadPoints; i++){
			squads.add(new Squad());
		}*/
		//pointsUsed = 6;
		armyName = "My Army";
	}
	
	public Army(String name){
		squadPoints = 8;
		pointsUsed = 0;
		squads = new ArrayList<Squad>();
		armyName = name;
	}
	
	public boolean addSquad(Squad squad){
		pointsUsed += squad.squadPoints;
		if(pointsUsed > squadPoints){
			pointsUsed -= squad.squadPoints;
			return false;
		}
		squads.add(squad);
		return true;
	}
	
	public void setId(int _id){
		id = _id;
	}
	
	public int getId(){
		return id;
	}
	
	public String getName(){
		return armyName;
	}
	
	
}
